Reorder track/waypt/route options n mapping GUI so they actually take effect.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 19 Jul 2009 06:52:23 +0000 (06:52 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 19 Jul 2009 06:52:23 +0000 (06:52 +0000)
Sketch in track breaker for Map GUI.

gpsbabel/gui/maindlg.cpp

index a78cfe5b54f4b8d1d85b05fdf5e02102a12c473d..8179764b4fca7babfc66301cc4548bd5fe5fc3c1 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-// $Id: maindlg.cpp,v 1.1 2009-07-05 21:14:56 robertl Exp $
+// $Id: maindlg.cpp,v 1.2 2009-07-19 06:52:23 robertl Exp $
 //------------------------------------------------------------------------
 //
 //  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.
@@ -678,7 +678,11 @@ void MainDlg::applyClicked()
   // Input char set if specified
   if (bd.enableCharSetXform && bd.inputCharSet != QString()) 
     args << "-c" << bd.inputCharSet;
-      
+
+  if (bd.xlateWayPts)        args << "-w";
+  if (bd.xlateRoutes)        args << "-r";
+  if (bd.xlateTracks)        args << "-t";
+
   // Input type, with options
   bool iisFile = (bd.inputType == BabelData::fileType);
   int fidx = formatIndexFromName(iisFile, iisFile ?
@@ -695,10 +699,6 @@ void MainDlg::applyClicked()
     args << "-f" << bd.inputDeviceName;
   }
 
-  if (bd.xlateWayPts)        args << "-w";
-  if (bd.xlateRoutes)        args << "-r";
-  if (bd.xlateTracks)        args << "-t";
-
   // --- Filters!
   args << filterData.getAllFilterStrings();
 
@@ -731,6 +731,12 @@ void MainDlg::applyClicked()
     ftemp.open();
     tempName = ftemp.fileName();
     ftemp.close();
+
+    // Ideally, expost this in the UI.  For now, just split the track
+    // if we've no recorded fixes for > 5 mins and we've moved > 300 meters.
+    args << "-x";
+    args << "track,pack,sdistance=0.3k,split=5m";
+
     args << "-o";
     args << "gpx";
     args << "-F" << tempName;